import pandas as pd
def cleancsv(fname):
    # 读取csv文件
    df = pd.read_csv(fname)

    # 删除含有NA值的行
    df = df.dropna()

    # 将结果写入新的csv文件
    df.to_csv('new_csv_file.csv', index=False)
    
cleancsv( r'C:\Users\User\Desktop\code\pycode\python15\PRSA_Data_20130301-20170228\all.csv' )